<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>04_模板解析_事件指令</title>
</head>
<body>
  <div id="test">
    <button v-on:click="test">测试</button>
  </div>

  <script type="text/javascript" src="js/mvvm/compile.js"></script>
  <script type="text/javascript" src="js/mvvm/mvvm.js"></script>
  <script type="text/javascript" src="js/mvvm/observer.js"></script>
  <script type="text/javascript" src="js/mvvm/watcher.js"></script>
  <script type="text/javascript">
   const vm =  new MVVM({
      el: '#test',
      data: {
        msg: 'hello atguigu'
      },
      methods: {
        test () {
          alert(this.msg)
        }
      }
    })
   // vm.test();
  </script>
</body>
</html>